home *** CD-ROM | disk | FTP | other *** search
/ Champak 52 / Volume 52 - JOGO DISK .iso / Games / shopdrop.swf / scripts / __Packages / StackPackage.as < prev   
Text File  |  2007-09-27  |  531b  |  23 lines

  1. class StackPackage extends MovieClip
  2. {
  3.    var nTypes = 20;
  4.    static var packageHeight = 30;
  5.    function StackPackage()
  6.    {
  7.       super();
  8.       this.nObject = Math.ceil(Math.random() * this.nTypes);
  9.    }
  10.    function update(nElapsed)
  11.    {
  12.       this.m.y += smashing.Phys.gr * nElapsed * 5;
  13.       this._x += this.m.x * nElapsed;
  14.       this._y += this.m.y * nElapsed;
  15.       var _loc2_ = Player.floor;
  16.       if(this._y > _loc2_)
  17.       {
  18.          this._y = _loc2_;
  19.          this.m.y = - this.m.y;
  20.       }
  21.    }
  22. }
  23.